﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Emoney.UserTraining.Admin.aspx
{
    /// <summary>
    /// ajaxisOpenMeeting 的摘要说明
    /// </summary>
    public class ajaxisOpenMeeting : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            string before_time = Request["before_time"];

            string Duration_date = Request["Duration_date"];

            if (before_time == null || before_time == "" || Duration_date == null || Duration_date == "")
            {
                Response.Write("2");
                Response.End();
            }

            if ((System.DateTime.Now - Convert.ToDateTime(before_time)).TotalSeconds > 0 && (Convert.ToDateTime(Duration_date) - System.DateTime.Now).TotalSeconds > 0)
            {
                Response.Write("1");
            }
            else
            {
                Response.Write("2");
            }
            Response.End();
        }

        public HttpRequest Request
        {
            get { return HttpContext.Current.Request; }
        }

        public HttpResponse Response
        {
            get { return HttpContext.Current.Response; }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}